package com.catering.controller;

import com.catering.service.InventoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inventory")
public class InventoryController {
    @Resource
    private InventoryService inventoryService;
    //根据菜品名称库存减少
    @RequestMapping("/reduceInventory")
    public void reduceInventory(String dishName){
        inventoryService.reduceInventory(dishName);
    }


}
